package com.baibei.model;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

import java.util.List;

/**
 * 船信息
 * Created by ChenRui on 2017/8/3 0003 14:49.
 */
public class ShipmentInfo implements Parcelable {


    /**
     * shipmentId : 0
     * name : 维多利亚号红酒船V
     * criditNum : 123456ABC
     * leaveTime : 12345678977655
     * arriveTime : 12345678977655
     */

    private int shipmentId;

    @SerializedName("brandName")
    private String name;
    private String shipmentNum; // 航次
    private String deliverUser; // 发货人
    private String consignee; // 收货人
    private String notifier;// 通知人
    private String entrepotPort;// 中转港
    private long estimateTime;//预计到达时间
    private String departPort;//装货港
    private String dischargePort;//卸货港
    private String destination;//目的地
    private String departTime;//离港时间
    private String arrivalTime;//到港时间
    private String destinationTransport;//目的地运输方式
    private String area;// 区域
    private Long entrepotTime;


    private List<ProductInfo> products;

    private int brandId;
    private String saleTips;

    public int getBrandId() {
        return brandId;
    }

    public void setBrandId(int brandId) {
        this.brandId = brandId;
    }

    @Override
    public String toString() {
        return "ShipmentInfo{" +
                "shipmentId=" + shipmentId +
                ", name='" + name + '\'' +
                ", shipmentNum='" + shipmentNum + '\'' +
                ", deliverUser='" + deliverUser + '\'' +
                ", consignee='" + consignee + '\'' +
                ", notifier='" + notifier + '\'' +
                ", entrepotPort='" + entrepotPort + '\'' +
                ", estimateTime=" + estimateTime +
                ", departPort='" + departPort + '\'' +
                ", dischargePort='" + dischargePort + '\'' +
                ", destination='" + destination + '\'' +
                ", departTime='" + departTime + '\'' +
                ", arrivalTime='" + arrivalTime + '\'' +
                ", destinationTransport='" + destinationTransport + '\'' +
                ", area='" + area + '\'' +
                ", entrepotTime=" + entrepotTime +
                ", products=" + products +
                ", brandId=" + brandId +
                ", saleTips='" + saleTips + '\'' +
                '}';
    }

    public String getSaleTips() {
        return saleTips;
    }

    public void setSaleTips(String saleTips) {
        this.saleTips = saleTips;
    }

    public Long getEntrepotTime() {
        return entrepotTime;
    }

    public void setEntrepotTime(Long entrepotTime) {
        this.entrepotTime = entrepotTime;
    }

    public int getShipmentId() {
        return shipmentId;
    }

    public void setShipmentId(int shipmentId) {
        this.shipmentId = shipmentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getShipmentNum() {
        return shipmentNum;
    }

    public void setShipmentNum(String shipmentNum) {
        this.shipmentNum = shipmentNum;
    }

    public String getDeliverUser() {
        return deliverUser;
    }

    public void setDeliverUser(String deliverUser) {
        this.deliverUser = deliverUser;
    }

    public String getConsignee() {
        return consignee;
    }

    public void setConsignee(String consignee) {
        this.consignee = consignee;
    }

    public String getNotifier() {
        return notifier;
    }

    public void setNotifier(String notifier) {
        this.notifier = notifier;
    }

    public String getEntrepotPort() {
        return entrepotPort;
    }

    public void setEntrepotPort(String entrepotPort) {
        this.entrepotPort = entrepotPort;
    }

    public long getEstimateTime() {
        return estimateTime;
    }

    public void setEstimateTime(long estimateTime) {
        this.estimateTime = estimateTime;
    }

    public String getDepartPort() {
        return departPort;
    }

    public void setDepartPort(String departPort) {
        this.departPort = departPort;
    }

    public String getDischargePort() {
        return dischargePort;
    }

    public void setDischargePort(String dischargePort) {
        this.dischargePort = dischargePort;
    }

    public String getDestination() {
        return destination;
    }

    public void setDestination(String destination) {
        this.destination = destination;
    }

    public String getDepartTime() {
        return departTime;
    }

    public void setDepartTime(String departTime) {
        this.departTime = departTime;
    }

    public String getArrivalTime() {
        return arrivalTime;
    }

    public void setArrivalTime(String arrivalTime) {
        this.arrivalTime = arrivalTime;
    }

    public String getDestinationTransport() {
        return destinationTransport;
    }

    public void setDestinationTransport(String destinationTransport) {
        this.destinationTransport = destinationTransport;
    }

    public List<ProductInfo> getProducts() {
        return products;
    }

    public void setProducts(List<ProductInfo> products) {
        this.products = products;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public ShipmentInfo() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.shipmentId);
        dest.writeString(this.name);
        dest.writeString(this.shipmentNum);
        dest.writeString(this.deliverUser);
        dest.writeString(this.consignee);
        dest.writeString(this.notifier);
        dest.writeString(this.entrepotPort);
        dest.writeValue(this.estimateTime);
        dest.writeString(this.departPort);
        dest.writeString(this.dischargePort);
        dest.writeString(this.destination);
        dest.writeString(this.departTime);
        dest.writeString(this.arrivalTime);
        dest.writeString(this.destinationTransport);
        dest.writeString(this.area);
        dest.writeValue(this.entrepotTime);
        dest.writeTypedList(this.products);
        dest.writeInt(this.brandId);
        dest.writeString(this.saleTips);
    }

    protected ShipmentInfo(Parcel in) {
        this.shipmentId = in.readInt();
        this.name = in.readString();
        this.shipmentNum = in.readString();
        this.deliverUser = in.readString();
        this.consignee = in.readString();
        this.notifier = in.readString();
        this.entrepotPort = in.readString();
        this.estimateTime = (Long) in.readValue(Long.class.getClassLoader());
        this.departPort = in.readString();
        this.dischargePort = in.readString();
        this.destination = in.readString();
        this.departTime = in.readString();
        this.arrivalTime = in.readString();
        this.destinationTransport = in.readString();
        this.area = in.readString();
        this.entrepotTime = (Long) in.readValue(Long.class.getClassLoader());
        this.products = in.createTypedArrayList(ProductInfo.CREATOR);
        this.brandId = in.readInt();
        this.saleTips = in.readString();
    }

    public static final Creator<ShipmentInfo> CREATOR = new Creator<ShipmentInfo>() {
        @Override
        public ShipmentInfo createFromParcel(Parcel source) {
            return new ShipmentInfo(source);
        }

        @Override
        public ShipmentInfo[] newArray(int size) {
            return new ShipmentInfo[size];
        }
    };
}
